<%@ page language="java" contentType="text/html; charset=UTF-8" isErrorPage="true" pageEncoding="UTF-8" %>
<%@ page import="java.io.ByteArrayOutputStream" %>
<%@ page import="java.io.PrintStream" %>
<%@ page import="cn.chinapsp.cltes.exception.ServiceException" %>
<%response.setStatus( HttpServletResponse.SC_OK );%>
<html>
<head>
    <script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery.js"></script>
</head>
<body>
系统内部错误，有可能该页面正在调试.
<a href="javascript:history.go(-1)">返回上一页</a>
<hr width=80%>
<%
%>
<h2><p style="color:#DB1260">错误页面</p></h2>
<%
    if (exception.getCause() instanceof ServiceException) {
        %><h3><%=((ServiceException)exception.getCause()).getSimpleMessage()%></h3><%
    } else {
        %><h3><%=exception.getMessage()%></h3><%
    }
%>

<p>详细错误信息(供开发者使用):&nbsp;&nbsp;<a href="#" onclick="$('#errors').toggle()">展开</a>
</p>
<pre style="display:none;text-align:left;" id="errors">
<%
    exception.printStackTrace();
    ByteArrayOutputStream ostr = new ByteArrayOutputStream();
    exception.printStackTrace( new PrintStream( ostr ) );
    out.print( ostr );
%>
</pre>
<hr width=80%>
</body>
</html>